package tw.com.softleader.json.jackson.app;

import java.io.File;

import com.fasterxml.jackson.databind.ObjectMapper;

import tw.com.softleader.json.jackson.entity.Question03Entity;

public class Question03App {

	public static void main(String[] args) {
		
		// read file
		File q3File = new File("c:\\question03.json");
		
		Question03Entity q03Entity = new Question03Entity();
		try {
			// TODO 將 q03Entity 寫成 JSON 檔案
			ObjectMapper objectMapper = new ObjectMapper();
			
			objectMapper.writeValue(q3File, q03Entity);
			objectMapper.writeValue(System.out, q03Entity);
			
		} catch (Exception e) {
			e.printStackTrace();
		} 
		
		
		
	}
	
}
